package org.example;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: tang
 * @Description:
 * @Date 2024/5/27 16:54
 */
@RestController
@RequestMapping("/send")
public class StreamController {

    @Resource
    private SendService sendService;

    /**
     * 发送人脸数据
     * localhost:7888/send/face/hello
     *
     * @param msg 消息
     */
    @GetMapping("/face/{msg}")
    public void sendFace(@PathVariable("msg") String msg){
        sendService.sendFaceMsg(msg);
    }

    /**
     * 发送人体数据
     *
     * @param msg
     */
    @GetMapping("/human/{msg}")
    public void sendHuman(@PathVariable("msg") String msg){
        sendService.sendHumanMsg(msg);
    }


}
